//
//  HistoryViewController.swift
//  Psychologist
//
//  Created by sdw on 15/11/28.
//  Copyright (c) 2015年 ai.com. All rights reserved.
//

import UIKit

class HistoryViewController: UIViewController {

    @IBOutlet weak var historyTextView: UITextView!{
        didSet{
            historyTextView.text = text
        }
    }
    
    var text : String = ""{
        didSet{
            historyTextView?.text = text
        }
    }
    
    override var preferredContentSize: CGSize{
        get{
            if historyTextView != nil && presentedViewController != nil {
                return historyTextView.sizeThatFits( presentedViewController!.view.bounds.size)
            }else {
                return super.preferredContentSize
            }
        }
        set{ super.preferredContentSize = newValue}
    }

}
